﻿using FluentValidation.Attributes;
using Nop.Admin.Models.Stores;
using Nop.Admin.Validators.Media;
using Nop.Core.Domain.Media;
using Nop.Web.Framework;
using Nop.Web.Framework.Mvc;
using System;
using System.Collections.Generic;
using System.Web.Mvc;

namespace Nop.Admin.Models.Media
{
    [Validator(typeof(SlideshowValidator))]
    public partial class SlideshowModel : BaseNopEntityModel
    {
        public SlideshowModel()
        {
            PicturelinkCollections = new List<SelectListItem>();
        }

        [NopResourceDisplayName("Admin.Media.Slideshow.Fields.PictureLinkCollectionId")]
        public int PictureLinkCollectionId { get; set; }

        // Common
        [NopResourceDisplayName("Admin.Media.Slideshow.Fields.SlideshowType")]
        public SlideshowType Type { get; set; }
        [NopResourceDisplayName("Admin.Media.Slideshow.Fields.Height")]
        public double Height { get; set; }
        [NopResourceDisplayName("Admin.Media.Slideshow.Fields.Width")]
        public double Width { get; set; }

        [NopResourceDisplayName("Admin.Media.Slideshow.Fields.AutoSlideInterval")]
        public double AutoSlideInterval { get; set; }

        [NopResourceDisplayName("Admin.Media.Slideshow.Fields.Enabled")]
        public bool Enabled { get; set; }
        
        // Carousel
        [NopResourceDisplayName("Admin.Media.Slideshow.Fields.HoverPause")]
        public bool HoverPause { get; set; }
        [NopResourceDisplayName("Admin.Media.Slideshow.Fields.Links")]
        public bool Links { get; set; }
        [NopResourceDisplayName("Admin.Media.Slideshow.Fields.Navigation")]
        public bool Navigation { get; set; }
        [NopResourceDisplayName("Admin.Media.Slideshow.Fields.ShowTitle")]
        public bool ShowTitle { get; set; }

        // 3D
        [NopResourceDisplayName("Admin.Media.Slideshow.Fields.AutoRotate")]
        public bool AutoRotate { get; set; }
        [NopResourceDisplayName("Admin.Media.Slideshow.Fields.MouseWheel")]
        public double MouseWheel { get; set; }
        [NopResourceDisplayName("Admin.Media.Slideshow.Fields.Speed")]
        public double Speed { get; set; }
        [NopResourceDisplayName("Admin.Media.Slideshow.Fields.XPosition")]
        public double XPosition { get; set; }
        [NopResourceDisplayName("Admin.Media.Slideshow.Fields.YPosition")]
        public double YPosition { get; set; }
        [NopResourceDisplayName("Admin.Media.Slideshow.Fields.YRadius")]
        public double YRadius { get; set; }

        #region Model Properties

        [NopResourceDisplayName("Admin.Media.Fields.SystemName")]
        public string CollectionSystemName { get; set; }

        public string HeightPx { get { return String.Format("{0}px", this.Height); } }
        public string WidthPx { get { return String.Format("{0}px", this.Width); } }

        public IList<SelectListItem> TypeOptions;        
        public IList<SelectListItem> PicturelinkCollections;

        #endregion
    }
}